###############################################################################
# SuperLinks                                                                  #
# Copyright (c) 2000-2007 Greg Nolle (http://greg.nolle.co.uk)                #
###############################################################################
# This program is free software; you can redistribute it and/or modify it     #
# under the terms of the GNU General Public License as published by the Free  #
# Software Foundation; either version 2 of the License, or (at your option)   #
# any later version.                                                          #
#                                                                             #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       #
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for   #
# more details.                                                               ##                                                                             #
# You should have received a copy of the GNU General Public License along     #
# with this program; if not, write to the Free Software Foundation, Inc.,     #
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                 #
###############################################################################
# Skins/Language/Add.pm.pl -> Add language module                             #
###############################################################################
# DON'T EDIT BELOW UNLESS YOU KNOW WHAT YOU'RE DOING!                         #
###############################################################################
package Language::Add;

BEGIN { require "General.pm.pl"; import General qw($GENERAL); }

require Exporter;

@ISA       = qw(Exporter);
@EXPORT    = qw(@EXPORT_OK);
@EXPORT_OK = qw($LANGUAGE);

use strict;
use vars qw($LANGUAGE);

$LANGUAGE = { #{start}
  "MISSING"               => {
    "TITLE"             => "<li>You didn't fill in the \"Title\" field.",
    "URL"               => "<li>You didn't fill in the \"URL\" field.",
    "CATEGORY"          => "<li>You didn't select a Category.",
    "DESCRIPTION"       => "<li>You didn't fill in the \"Description\" field.",
    "KEYWORDS"          => "<li>You didn't fill in the \"Keywords\" field.",
    "CONTACT_NAME"      => "<li>You didn't fill in the \"Contact Name\" field.",
    "CONTACT_EMAIL"     => "<li>You didn't fill in the \"Contact Email\" field.",
    "PASSWORD"          => "<li>You didn't fill in the \"Password\" field.",
    "PASSWORD2"         => "<li>You didn't fill in the \"Verify Password\" field.",
    "IMAGE_URL"         => "<li>You didn't fill in the \"Image URL\" field.",
    "IMAGE_UPLOAD"      => "<li>You didn't fill in the \"Image Upload\" field."
  },
  "INVALID"               => {
    "URL"               => "<li>The URL you entered does not contain http://, https:// or ftp://.",
    "CONTACT_EMAIL"     => "<li>The Contact Email address you entered is invalid.",
    "CATEGORY"          => "<li>The category that you specified doesn't exist.",
    "IMAGE_UPLOAD_SIZE" => "<li>The Image Upload file must be [%general.UPLOAD_MAXSIZE%]KB or less.",
    "IMAGE_UPLOAD_EXT"  => "<li>The Image Upload file must have one of the following extensions: [%general.UPLOAD_EXTENSIONS.join(\", \")%].",
    "IMAGE_UPLOAD_TYPE" => "<li>The Image Upload file you specified does not appear to be an image.",
    "IMAGE_UPLOAD_DIM"  => "<li>The Image Upload file's dimensions must be less than or equal to [%general.UPLOAD_MAXWIDTH%]W x [%general.UPLOAD_MAXHEIGHT%]H."
  },
  "TOOLONG"               => {
    "TITLE"             => "<li>The Title must be [%general.SIZE_TITLE%] characters or under.",
    "URL"               => "<li>The URL must be 256 characters or under.",
    "DESCRIPTION"       => "<li>The Description must be [%general.SIZE_DESCRIPTION%] characters or under.",
    "KEYWORDS"          => "<li>The Keywords must be [%general.SIZE_KEYWORDS%] characters or under.",
    "IMAGE_URL"         => "<li>The Image URL must be 512 characters or under.",
    "CONTACT_NAME"      => "<li>The Contact Name must be 128 characters or under.",
    "CONTACT_EMAIL"     => "<li>The Contact Email must be 128 characters or under.",
    "PASSWORD"          => "<li>The Contact Email must be 64 characters or under."
  },
  "ALREADYEXISTS"         => {
    "URL"               => "<li>The URL you entered has already been added to the database."
  },

  "EXTRA-MISSING"         => "<li>You didn't fill in the \"[%field.DESCRIPTION%]\" field.",
  "EXTRA-TOOLONG"         => "<li>The [%field.DESCRIPTION%] must be [%field.SIZE%] characters or under.",
  
  "BANNED-URL"            => "<li>The URL you entered has been banned.",
  "PASSWORDS-DONT-MATCH"  => "<li>The passwords you specified don't match.",
  "ERROR"                 => "<font class=\"error\">There were errors:<ul>[%error%]</ul></font>",

  "EMAILSUBJECT-USER"     => "Your resource at [%general.LINKS_TITLE%]",
  "EMAILSUBJECT-ADMIN"    => "New resource at [%general.LINKS_TITLE%]"
}; #{end}

foreach my $field (@{ $GENERAL->{'RESOURCE_EXTRA'} }) {
  $LANGUAGE->{'MISSING'}->{'EXTRA_'.$field->{'ID'}} = &Standard::Substitute(
    INPUT   => \$LANGUAGE->{'EXTRA-MISSING'},
    FIELDS  => { "field" => $field }
  );
  $LANGUAGE->{'TOOLONG'}->{'EXTRA_'.$field->{'ID'}} = &Standard::Substitute(
    INPUT   => \$LANGUAGE->{'EXTRA-TOOLONG'},
    FIELDS  => { "field" => $field }
  );
}

1;